//package study.alibaba.sentinel.support.sentinel;
//
//import com.alibaba.csp.sentinel.init.InitExecutor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.boot.ApplicationArguments;
//import org.springframework.boot.ApplicationRunner;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//public class SentinelDashboardRunner implements ApplicationRunner {
//
//    @Value("${spring.application.name}")
//    private String projectName;
//    @Value("${sentinel.dashboard.server}")
//    private String server;
//
//    @Override
//    public void run(ApplicationArguments args) throws Exception {
//        //连接到控制台，与 sentinel 控制台通信
//        System.setProperty("csp.sentinel.app.name", projectName);
//        System.setProperty("csp.sentinel.dashboard.server", server);
//        InitExecutor.doInit();
//        log.info("{}", projectName);
//        log.info("{}", server);
//        log.info(">>>>>>>>>> 连接 Dashboard");
//    }
//}
